<template>
  <div>
    <div ref="editor" style="text-align:left"></div>
  </div>
</template>
<script>
import {
  mapState,
  mapActions,
  mapMutations
} from 'vuex'
import E from 'wangeditor'
export default {
  name: 'ContentEditor',
  data () {
    return {
      editorContent: ''
    }
  },
  computed: {
  },
  methods: {
    getContent: function () {
      alert(this.editorContent)
    }
  },
  mounted () {
    var editor = new E(this.$refs.editor)
    editor.customConfig.onchange = (html) => {
      this.editorContent = html
    }
    editor.customConfig.uploadImgShowBase64 = true
    editor.create()
  }
}
</script>
